#ifndef H_SETUP
#define H_SETUP

#include "Arduino.h"

// RADIO SECTION
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// FAILSAFE channels
#define FAILSAFE { 1500,1500,1000,1000, 1000, 1000, 1500, 1500 }
#define CENTER 1500 // us

// RX Type D2 is PPMSUM or D2 D4 D5 D6
#define PPMSUM

// Channel Name with receiver (or order of the PPMSUM
#define AIL 0
#define ELE 1
#define THR 2
#define RUD 3
#define AUX 4

// ESC/Servo Section
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//#define A0_A1_PIN_HEX // D5 D6 are the extra channel or A0 A1 if you enable this




// Hardware Section
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

// BOARD TYPE
#define STANDARD
//#define PIPO 1 // 1 or 2
#define PULLUP false

// Multicopter TYPE
#define QUADX
//#define HEXAX
//#define HEXAP

// CAMERA Stabilization
/*#define CAMSTAB

// ROLL
#define CAMMINR -1
#define CAMMIDR 0
#define CAMMULR (-1.0/(6 0*DEG_TO_RAD))
#define CAMMAXR 1

// PITCH
#define CAMMINP -1
#define CAMMIDP 0
#define CAMMULP (1.0/(60*DEG_TO_RAD))
#define CAMMAXP 1
*/


// Sensors

//////////////////////////////////////////////////////////////////
#define GYRO_PRESENT

//#define L3G4200D
//#define GYRO_ADDR 0xD2

//#define ITG3200
//#define GYRO_ADDR 0xD0

#define MPU6050
#define GYRO_ADDR 0xD0

// Normal Y front X right Z up
#define GYRO_ORIENTATION(X, Y, Z) { ri=X; pi=Y; yi=Z; } // Normal DOT UP LEFT
//#define GYRO_ORIENTATION(X, Y, Z) { ri=Y; pi=-X; yi=Z; } // sensor is rotated 90 degree to the right so compensate
//#define GYRO_ORIENTATION(X, Y, Z) { ri=-Y; pi=X; yi=Z; } // sensor is rotated 90 degree to the left so compensate



//////////////////////////////////////////////////////////////////
#define ACC_PRESENT
//#define BMA180
#define ACC_ADDR 0xD0
#define ACC_ORIENTATION(X, Y, Z) { xi=X; yi=Y; zi=Z; } // Normal DOT UP RIGHT
//#define ACC_ORIENTATION(X, Y, Z) { xi=Y; yi=-X; zi=Z; } // sensor is rotated 90 degree to the right so compensate
//#define ACC_ORIENTATION(X, Y, Z) { xi=-Y; yi=X; zi=Z; } // sensor is rotated 90 degree to the left so compensate


/*
//////////////////////////////////////////////////////////////////
#define MAG_PRESENT
//#define HMC5843
#define HMC5883L
#define MAG_ADDR 0x3C
#define MAG_ORIENTATION(X, Y, Z) { xi=X; yi=Y; zi=Z; } // Normal DOT UP LEFT
//#define MAG_ORIENTATION(X, Y, Z) { xi=Y; yi=-X; zi=Z; } // sensor is rotated 90 degree to the right so compensate
//#define MAG_ORIENTATION(X, Y, Z) { xi=-Y; yi=X; zi=Z; } // sensor is rotated 90 degree to the left so compensate


#define BARO_PRESENT
#define BMP085
#define BARO_ADDR 0xEE
*/

// Extra Section
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


#endif

